package mr.ali.video.web.mapper;

import mr.ali.video.web.model.CollectionAlpay;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
* <p>
    *  Mapper 接口
    * </p>
*
* @author Mr-ali
* @since 2025-08-03
*/
    @Repository
    public interface CollectionAlpayMapper extends BaseMapper<CollectionAlpay> {
    @Update("update collection_alpay set displayed=#{displayed} where id = #{id}")
    Integer updateAlpay(@Param("id") Integer id, @Param("displayed") Integer displayed);

    @Update("update collection_alpay set name = #{name}, originalPrice = #{originalPrice}, currentPrice = #{currentPrice}, days = #{days}, displayed = #{displayed} where id = #{id}")
    Integer updateAlpayName(CollectionAlpay alpay);
    }
